package bocchi.card;

import bocchi.BocchiCore;
import bocchi.base.BaseCustomCard;
import com.evacipated.cardcrawl.mod.stslib.actions.common.SelectCardsAction;
import com.megacrit.cardcrawl.actions.common.ExhaustSpecificCardAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class PayNextMonth extends BaseCustomCard {
    private static final String RAW_ID = PayNextMonth.class.getSimpleName();
    public static final String GAME_ID = BocchiCore.getGameID(RAW_ID);

    public PayNextMonth() {
        super(RAW_ID);
    }

    @Override
    public void use(AbstractPlayer player, AbstractMonster monster) {
        String text = String.format("选择 %d 张牌消耗", magicNumber);
        addToBot(new GainBlockAction(player, player, block));
        addToBot(new SelectCardsAction(player.discardPile.group, magicNumber, text, true, card -> true, cards -> {
            for (AbstractCard card : cards) {
                addToBot(new ExhaustSpecificCardAction(card, player.discardPile));
            }
        }));
    }
}
